/**
 * MenuAction.java
 *2014年5月3日下午9:53:32
 *LINKT
 */
package com.bh.action;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

/**
 * @author LINKT
 *
 */
@SuppressWarnings("serial")
public class MenuAction extends BaseAction {

        private int menunum;
        private int itemnum;

        public void getmenu() {
                if (menunum==0) {//如果menunum为空
                        this.out("请求失败");
                }else {
                        HttpServletResponse response=ServletActionContext.getResponse();
                        switch (menunum) {
                        case 1:
                                try {
                                        response.sendRedirect("menu/fptj.jsp");
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                                break;
                        case 2:
                                try {
                                        response.sendRedirect("menu/fpcx.jsp");
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                                break;
                        case 3:
                                try {
                                        response.sendRedirect("menu/fplg.jsp");
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                                break;
                        case 4:
                                try {
                                        response.sendRedirect("menu/fpyj.jsp");
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                                break;
                        case 5:
                                try {
                                        response.sendRedirect("menu/xtgl.jsp");
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                                break;
                        case 6:
                                try {
                                        response.sendRedirect("menu/xtbz.jsp");
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                                break;

                        default:
                                break;
                        }
                }
        }

        public void getleftmenu() {
                HttpServletResponse response=ServletActionContext.getResponse();
                switch (menunum) {
                case 1://发票统计
                        switch (itemnum) {
                        case 1:
                                try {
                                        response.sendRedirect("page/fptj/chartnow.jsp");
                                } catch (IOException e) {
                                        e.printStackTrace();
                                }
                                break;
                        case 2:
                                break;
                        }
                        
                        break;
                case 2://发票查询
                        switch (itemnum) {
                        case 1:
                                try {
                                        response.sendRedirect("page/fpcx/zcfpcx.jsp");
                                } catch (IOException e) {
                                        e.printStackTrace();
                                }
                                break;
                        case 2:
                                break;
                        }
                        break;
                case 3://发票领购
                        
                        break;
                case 4://发票验旧
                        
                        break;
                case 5://系统管理
                        
                        break;
                case 6://系统帮助
                        
                        break;
                }
        }
        public int getMenunum() {
                return menunum;
        }

        public void setMenunum(int menunum) {
                this.menunum = menunum;
        }

        public int getItemnum() {
                return itemnum;
        }

        public void setItemnum(int itemnum) {
                this.itemnum = itemnum;
        }

        
}
